﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GTA.Translators.BusinessEntityToReportEntity
{
    public class TaskQuantityTranslator
    {
        public static List<ReportEntity.TaskQuantityProjects> ToTaskQuantityProjects(List<BusinessEntity.InformativeSummaryProjects> summaryProjects)
        {
            List<ReportEntity.TaskQuantityProjects> list = new List<GTA.ReportEntity.TaskQuantityProjects>();
            if (summaryProjects != null)
            {
                foreach (BusinessEntity.InformativeSummaryProjects itemSummary in summaryProjects)
                {
                    list.Add(new GTA.ReportEntity.TaskQuantityProjects()
                    {
                        ProjectName = itemSummary.ProjectName,
                        Quantity = itemSummary.TaskQuantity
                    });
                }
            }
            return list;
        }
        public static List<ReportEntity.TaskQuantityArchitects> ToTaskQuantityArchitects(List<BusinessEntity.InformativeSummaryArchitects> summaryArchitects)
        {
            List<ReportEntity.TaskQuantityArchitects> list = new List<GTA.ReportEntity.TaskQuantityArchitects>();
            if (summaryArchitects != null)
            {
                foreach (BusinessEntity.InformativeSummaryArchitects itemSummary in summaryArchitects)
                {
                    list.Add(new GTA.ReportEntity.TaskQuantityArchitects()
                    {
                        ArchitectName = itemSummary.ArchitectName,
                        Quantity = itemSummary.TaskQuantity
                    });
                }
            }
            return list;
        }
        public static List<ReportEntity.TaskQuantityStates> ToTaskQuantityStates(List<BusinessEntity.InformativeSummaryStates> summaryStates)
        {
            List<ReportEntity.TaskQuantityStates> list = new List<GTA.ReportEntity.TaskQuantityStates>();
            if (summaryStates != null)
            {
                foreach (BusinessEntity.InformativeSummaryStates itemSummary in summaryStates)
                {
                    list.Add(new GTA.ReportEntity.TaskQuantityStates()
                    {
                        StateDescription = itemSummary.StateDescription,
                        Quantity = itemSummary.TaskQuantity
                    });
                }
            }
            return list;
        }
        public static List<ReportEntity.TaskQuantityCategories> ToTaskQuantityCategories(List<BusinessEntity.InformativeSummaryCategories> summaryCategories)
        {
            List<ReportEntity.TaskQuantityCategories> list = new List<GTA.ReportEntity.TaskQuantityCategories>();
            if (summaryCategories != null)
            {
                foreach (BusinessEntity.InformativeSummaryCategories itemSummary in summaryCategories)
                {
                    list.Add(new GTA.ReportEntity.TaskQuantityCategories()
                    {
                        CategoryDescription = itemSummary.CategoryDescription,
                        Quantity = itemSummary.TaskQuantity
                    });
                }
            }
            return list;
        }
    }
}
